const path = require("path")
const htmlWebpackPlugin = require("html-webpack-plugin")

module.exports = {
    entry: "./src/index.js",
    mode: 'development',
    devtool: 'inline-source-map',
    output: {
        filename: "打包输出.js",
        path: path.resolve(__dirname, './dist'),
        // 打包时清空文件夹
        clean: true
    },
    plugins: [
        //
        new htmlWebpackPlugin({
            title: '打包处理',
            // 复制index.html文件内容打包
            template: "./index.html"
        })
    ]
}